#include <stdio.h>

main() {
    char *holptr, holder[81], *inptr, input[81];  
    int c; 
    holptr = holder; inptr = input; 

    printf("Enter fewer than 80 characters: ");
    fgets(input, 81, stdin); 

    if (input[0] == '\n') {
	puts("You entered nothing."); 
	return 0;
    }

    *(holptr++) = *(inptr++); 
    while (*inptr != 3) {
	c = *(inptr++); 
	if ( c == 9 || c == 8 || c == 92 ) { 
	    *(holptr++) = '\\'; 
	    switch (c) {
		case 9: 
		    c = 't'; 
		    break; 
		case 8: 
		    c = 'b'; 
		    break;
		case 92:
		    c = '\\'; 
		    break; 
	    }
	}
	*(holptr)++ = c;
    }

    printf("Replaced: %s", holder); 
}
